# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-asciistuff
_pkgname=asciistuff
pkgver=1.3.3
pkgrel=1
pkgdesc='Library for producing ASCII arts from a text or an image.'
arch=('any')
url='https://pypi.org/project/asciistuff/#files'
license=('AGPL3')
depends=('python' 'python-terminaltables' 'python-termcolor' 'python-cowpy'
         'python-pyfiglet')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4836da0c7fadf4e97ad8d61832db403b8465101941b3ebd84eda6f47ea14c6d793bf3501c23f33505a3a33338408be56df5c5069ce0878993e8b4661073fc930')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

